<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8"/>
        <title>初识vue</title>
        <!--引入vue-->
    <!-- <script type="text/javascript" src="../js/vue.js"></script> -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    </head>
    
    <body>
        <script type="text/javascript">
            let obj1 = {x:100}
            let obj2 = {y:100}

            Object.defineProperty(obj2,'x',{
                 get(){
                    return obj1.x
                 },
                 set(value) {
                    obj1.x = value
                 }
            })
            

        </script>
    
    </body>
</html>